Action hook 'edited_{$taxonomy}'

in WP Core File wp-includes/taxonomy.php at line 3483

View Source

edited_{$taxonomy}

Action Hook
Description
Fires after a term for a specific taxonomy has been updated, and the term cache has been cleaned. The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. Possible hook names include: - `edited_category` - `edited_post_tag`

Hook Information

File Location wp-includes/taxonomy.php View on GitHub
Hook Type Action
Line Number 3483

Hook Parameters

Type Name Description
int $term_id Term ID.
int $tt_id Term taxonomy ID.
array $args Arguments passed to wp_update_term().

Usage Examples

Basic Usage
<?php
// Hook into edited_{$taxonomy}
add_action('edited_{$taxonomy}', 'my_custom_function', 10, 3);

function my_custom_function($term_id, $tt_id, $args) {
    // Your custom code here
}

Source Code Context

wp-includes/taxonomy.php:3483 - How this hook is used in WordPress core
<?php
3478  	 *
3479  	 * @param int   $term_id Term ID.
3480  	 * @param int   $tt_id   Term taxonomy ID.
3481  	 * @param array $args    Arguments passed to wp_update_term().
3482  	 */
3483  	do_action( "edited_{$taxonomy}", $term_id, $tt_id, $args );
3484  
3485  	/** This action is documented in wp-includes/taxonomy.php */
3486  	do_action( 'saved_term', $term_id, $tt_id, $taxonomy, true, $args );
3487  
3488  	/** This action is documented in wp-includes/taxonomy.php */

PHP Documentation

<?php
/**
	 * Fires after a term for a specific taxonomy has been updated, and the term
	 * cache has been cleaned.
	 *
	 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
	 *
	 * Possible hook names include:
	 *
	 *  - `edited_category`
	 *  - `edited_post_tag`
	 *
	 * @since 2.3.0
	 * @since 6.1.0 The `$args` parameter was added.
	 *
	 * @param int   $term_id Term ID.
	 * @param int   $tt_id   Term taxonomy ID.
	 * @param array $args    Arguments passed to wp_update_term().
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 3
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.